<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
	#box{
		 width: 600px;
		 border: 1px solid #ccc;
		 height: 300px;
		 margin-top: 100px;
		 margin:0 auto;
        }
        .sbox{
        	width: 50px;
        	height: 50px;
        	border: 1px solid #fff;
        	background:#666;
        	margin-left:250px;
        }
	</style>
</head>
<body>
<div id="box">
	<input type="button" onclick="changeWidth" value="变宽">
	<input type="button" onclick="changeHeight" value="变高">
	<input type="button" onclick="changeColor" value="变色">
	<input type="button" onclick="yc" value="隐藏">
	<input type="button" onclick="cz" value="重置">
	<div class="sbox">
		
	</div>
</div>
	
</body>
<script type="text/javascript">
	function changeWidth(){
		var Osbox = document.getElementByClassName("sbox");
		Osbox[0].style.width = "200";
	}
</script>
</html>